package cn.itcast.customview.Actrvity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import cn.itcast.customview.R;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    Button btn_YouKu,btn_AnNiu,btn_Pager,btn_XiaLa,btn_CirCuit,btn_attr,btn_my,btn_menu;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        btn_YouKu=(Button)findViewById(R.id.btn_YouKu);
        btn_AnNiu=(Button)findViewById(R.id.btn_AnNiu);
        btn_Pager=(Button)findViewById(R.id.btn_Pager);
        btn_XiaLa=(Button)findViewById(R.id.btn_XiaLa);
        btn_CirCuit=(Button)findViewById(R.id.btn_CirCuit);
        btn_attr=(Button)findViewById(R.id.btn_attr);
        btn_my=(Button)findViewById(R.id.btn_my);
        btn_menu=(Button)findViewById(R.id.btn_menu);

        btn_YouKu.setOnClickListener(this);
        btn_AnNiu.setOnClickListener(this);
        btn_Pager.setOnClickListener(this);
        btn_XiaLa.setOnClickListener(this);
        btn_CirCuit.setOnClickListener(this);
        btn_attr.setOnClickListener(this);
        btn_my.setOnClickListener(this);
        btn_menu.setOnClickListener(this);


    }

    @Override
    public void onClick(View view) {

        switch (view.getId()){

            case R.id.btn_YouKu:

                Intent btn_YouKu=new Intent(this,YouKuActivity.class);

                startActivity(btn_YouKu);

                break;

            case R.id.btn_AnNiu:

                Intent btn_AnNiu=new Intent(this,PropertyAnimationActivity.class);

                startActivity(btn_AnNiu);

                break;
            case R.id.btn_Pager:

                Intent btn_Pager=new Intent(this,ViewPagerActivity.class);

                startActivity(btn_Pager);

                break;
            case R.id.btn_XiaLa:

                Intent btn_XiaLa=new Intent(this,ComboboxActivity.class);

                startActivity(btn_XiaLa);

                break;

            case R.id.btn_CirCuit:

                Intent btn_CirCuit=new Intent(this,CirCuitActivity.class);

                startActivity(btn_CirCuit);

                break;
            case R.id.btn_attr:

                Intent btn_attr=new Intent(this,AttriButeActivity.class);

                startActivity(btn_attr);

                break;
            case R.id.btn_my:

                Intent btn_my=new Intent(this,MyViewPagerActivity.class);

                startActivity(btn_my);

                break;

            case R.id.btn_menu:

                Intent btn_menu=new Intent(this,SlideMenuActivity.class);

                startActivity(btn_menu);

                break;
        }

    }
}
